package com.epam.command.login;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.epam.command.logic.Command;
import com.epam.util.ConfigurationManager;

public class SignOutCommand implements Command {

	
	
	@Override
	public String execute(HttpServletRequest request,
		HttpServletResponse response) {
		
		String page = ConfigurationManager.getConfig(ConfigurationManager.LOGIN_PAGE);
		
		HttpSession session = request.getSession();
		session.invalidate();
		
		return page;
		
	}

}
